package com.chen.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.chen.entity.Video;
import com.chen.mapper.VideoMapper;
import com.chen.service.IVideoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Y·C
 * @since 2023-04-26
 */
@Service
public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements IVideoService {


    @Override
    public void adoptByCids(List<Integer> ids) {

        //批量修改
        Video video = new Video();
        video.setState(1);
        UpdateWrapper wrapper = new UpdateWrapper();
        wrapper.in("id", ids);
        baseMapper.update(video, wrapper);

    }
}
